package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.it.networkassets.MaintenanceInformation;
import com.glsc.ngateway.common.api.platform.dto.it.networkassets.MaintenanceInformationDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;


/**
 * @Author: xc
 * @Date: 2023/03/16
 * @Desc: domin到dto转换辅助类
 */
@Mapper(componentModel = "spring")
public interface MaintenanceInformationMapper {
    MaintenanceInformationMapper INSTANCE = Mappers.getMapper(MaintenanceInformationMapper.class);

//    @Mapping(target = "insertTime", ignore = true)
//    @Mapping(target = "updateTime", ignore = true)
//    @Mapping(target = "deleted", ignore = true)
    MaintenanceInformationDto domain2dto(MaintenanceInformation domain);

    List<MaintenanceInformationDto> domain2dto(List<MaintenanceInformation> domain);

    @Mapping(target = "insertTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "deleted", ignore = true)
    MaintenanceInformation dto2domain(MaintenanceInformationDto dto);

    List<MaintenanceInformation> dto2domain(List<MaintenanceInformationDto> dto);
}
